/*
 * @Author: xws 1043495328@qq.com
 * @Date: 2023-07-24 15:12:42
 * @LastEditors: xws 1043495328@qq.com
 * @LastEditTime: 2023-07-25 14:38:35
 * @FilePath: \vue3-admin-template\src\api\product\attr\type.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export interface ResponseData {
  code: number
  message: string
  ok: boolean
}
//分类ts类型
export interface CategoryObj {
  id: number | string
  name: string
  category1Id?: number
  category2Id?: number
}
//相应的分类接口返回数据的类型
export interface CategoryResponseData extends ResponseData {
  data: CategoryObj[]
}
//属性与属性值的ts类型
//属性值对象的ts类型
export interface AttrValue {
  id: number | string
  valueName: string
  attrId: number
  flag?: boolean
}
//存储每一个属性值的数组类型
export type AttrValueList = AttrValue[]
// 属性对象
export interface Attr {
  id: number | string
  attrName: string
  categoryId: number | string
  categoryLevel: number
  attrValueList: AttrValueList
}
//存储每一个属性对象的数组ts类型
export type AttrList = Attr[]
//属性接口返回的数据ts类型
export interface AttrResponseData extends ResponseData {
  data: Attr[]
}
